import Vue from 'vue'; //引入Vue
import Router from 'vue-router'; //引入vue-router
import hhf from './hhf'
import hc from './hc'
import register from '@/components/register';
import Homepage from '@/components/Homepage';
import defaults from '@/components/defaults';
import HelloWorld from '@/components/HelloWorld';
import Page1 from '@/components/page/page1.vue';
import Page2 from '@/components/page/page2.vue';
import Page3 from '@/components/page/page3.vue';
import Page4 from '@/components/page/page4.vue';
import expenses from '@/components/page/expenses.vue';
import BusinessSub from '@/components/BusinessSub';
import Commodity from '@/components/Commodity';
import PerProcess from '@/components/PerProcess';
import Effective from '@/components/Effective';
import Dispatch from '@/components/Dispatch';
import Takeeffect from '@/components/Takeeffect';
import Service from '@/components/Service';
import Modify from '@/components/Modify';

Vue.use(Router); //Vue全局使用Router
let routes = [
  {
    path: '/register',
    name: 'register',
    component: register
  }, {
    path: '/Homepage',
    name: 'Homepage',
    component: Homepage,
    children: [
      {
        path: '/Homepage/',
        name: 'defaults',
        component: defaults
      }, {
        path: '/Homepage/HelloWorld',
        name: 'HelloWorld',
        component: HelloWorld
      }, {
        path: '/Homepage/page1',
        name: 'page1',
        component: Page1
      }, {
        path: '/Homepage/page2',
        name: 'page2',
        component: Page2
      }, {
        path: '/Homepage/page3',
        name: 'page3',
        component: Page3
      }, {
        path: '/Homepage/page4',
        name: 'page4',
        component: Page4
      }, {
        path: '/Homepage/expenses',
        name: 'expenses',
        component: expenses
      }, {
        path: '/Homepage/BusinessSub/:id',
        name: 'BusinessSub',
        component: BusinessSub
      }, {
        path: '/Homepage/Commodity/:id',
        name: 'Commodity',
        component: Commodity
      }, {
        path: '/Homepage/PerProcess/:id',
        name: 'PerProcess',
        component: PerProcess
      }, {
        path: '/Homepage/Effective/:id',
        name: 'Effective',
        component: Effective
      }, {
        path: '/Homepage/Dispatch/:id',
        name: 'Dispatch',
        component: Dispatch
      }, {
        path: '/Homepage/Takeeffect/:id',
        name: 'Takeeffect',
        component: Takeeffect
      }, {
        path: '/Homepage/Service/:id',
        name: 'Service',
        component: Service
      }, ...hc
    ]
  }, {
    path: '/Modify',
    name: 'Modify',
    component: Modify
  },...hhf]
export default new Router({
  routes                   //配置路由，这里是个数组
})
